package com.suxin.job;

import com.alibaba.fastjson.JSONObject;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @Classname TestJob
 * @Description [ TODO ]
 * @Author Tang
 * @Date 2020/11/9 14:02
 * @Created by ASUS
 */
public class TestJob extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("TestJob run..." + jobExecutionContext.getJobRunTime());
        System.out.println(JSONObject.toJSONString(jobExecutionContext.getTrigger().getJobDataMap()));
    }
}